PlatformerOnCode

An asset by fangshiao
The page banner background of a mountain and forest
PlatformerOnCode thumbnail image
PlatformerOnCode thumbnail image
PlatformerOnCode thumbnail image
PlatformerOnCode hero image

Quick Information

0 ratings
PlatformerOnCode icon image
fangshiao
PlatformerOnCode

A platformer demo which use 'code blocks' platform , including level generation by python file ; character control ; trap system (spring, trigger, pry ... ) enabled player to pause time and place the trap ; buiding transforms by ‘code blocks’ ; easy plot dialog ; user record saving.

Supported Engine Version
4.0
Version String
1.0
License Version
MIT
Support Level
community
Modified Date
10 months ago
Git URL
Issue URL

PlatformerOnCode Demo

A platformer demo which use 'code blocks' platform , including :

  1. Level generation by python file.
  2. Character control ;trap system (spring, trigger, pry ... ) enabled player to pause time and place the trap .
  3. Building transforms by 'code blocks'.
  4. Easy plot dialog ;
  5. Simple user record saving.

Generate platform by codes

  1. Edit level you want in c++ codes like : platformer_floor\codeFloor\floor0.cpp
  2. Change level id in py code
  3. Run lexer.py to generate json file

Create trap Example

set traps in few codes

Extends Trap

extends Trap
class_name TrapSpring

Override functions

func onTargetEnter(target):
    if (target.velocity.y<-200):
        return
    Events.playEffectSound.emit("Bubble heavy 1.wav")

    # label animation
    label.position = Vector2(0,0)
    var up = Actions.MoveBy.new(Vector2(0,-20),0.05).easeOutCirc()
    var down = Actions.MoveBy.new(Vector2(0,20),0.1).easeInCirc()
    Actions.Seq.new([up,down]).run(label)

    # target velocity
    target.velocity = Vector2(0,-500)
    

Set Trap Example

set traps in trap cfg (todo: create in no auto load files)

var levels = {
    "lv0" = [
        {
            "pos" = {
                line = 80,
                count = 65,
            },

            "trap" = TrapPlot.new("lv0guide1")
        },
        {
            "pos" = {
                line = 78,
                count = 1,
            },
            "trap" = TrapSpring.new()
        }
    ]
}

Preview

'Code blocks' platform and trap system

Plot dialog

Building transforms by 'code blocks'

A platformer demo which use 'code blocks' platform , including level generation by python file ; character control ; trap system (spring, trigger, pry ... ) enabled player to pause time and place the trap ; buiding transforms by ‘code blocks’ ; easy plot dialog ; user record saving.

Reviews

0 ratings

Your Rating

Headline must be at least 3 characters but not more than 50
Review must be at least 5 characters but not more than 500
Please sign in to add a review

Quick Information

0 ratings
PlatformerOnCode icon image
fangshiao
PlatformerOnCode

A platformer demo which use 'code blocks' platform , including level generation by python file ; character control ; trap system (spring, trigger, pry ... ) enabled player to pause time and place the trap ; buiding transforms by ‘code blocks’ ; easy plot dialog ; user record saving.

Supported Engine Version
4.0
Version String
1.0
License Version
MIT
Support Level
community
Modified Date
10 months ago
Git URL
Issue URL

Open Source

Released under the AGPLv3 license

Plug and Play

Browse assets directly from Godot

Community Driven

Created by developers for developers